home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / gnuwget.zip / wget-1.4.3 / src / init.h < prev    next >
C/C++ Source or Header  |  1997-01-30  |  3KB  |  89 lines

  1. /* Declarations for reading/parsing the initialization file.
  2.    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
  3.    
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2 of the License, or
  7.    (at your option) any later version.
  8.    
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.    
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  17.  
  18.  
  19. #ifndef INIT_H
  20. #define INIT_H
  21.  
  22. #define ISODIGIT(x) ((x) >= '0' && (x) <= '7')
  23.  
  24. /* Print definitions for default style. */
  25. #define DOTS_IN_LINE 50
  26. #define DOT_BYTES 1024
  27. #define DOT_SPACING 10
  28.  
  29. /* Command enumeration. */
  30. typedef enum {
  31.    NONE, ACCEPT, ADDHOSTDIR, ALWAYSREST, BACKUPS, BASEHREF,
  32.    CACHE, CONVERTLINKS, DEBUG_, DELETEAFTER,
  33.    DIRMODE, DIRPREFIX, DIRSTRUCT, DOMAINS,
  34.    DOTBYTES, DOTSINLINE, DOTSPACING, DOTSTYLE,
  35.    EXCLUDEDIRECTORIES, EXCLUDEDOMAINS, FILEPREFIX,
  36.    FOLLOWFTP, FORCEHTML, FTPPROXY, GLOB,
  37.    HEADER, HTMLIFY, HTTPPASSWD, HTTPPROXY, HTTPUSER, IGNORELENGTH,
  38.    INPUT, INCLUDEDIRECTORIES, KILLLONGER, LOGFILE, LOGIN,
  39.    MIRROR, NOCLOBBER, NOPARENT, NOPROXY, NUMTRIES,
  40.    OUTPUTDOCUMENT, PASSIVEFTP, PASSWD, PREFIXFILES, QUIET, QUOTA,
  41.    RECLEVEL,
  42.    RECURSIVE, REJECT, RELATIVEONLY, REMOVELISTING, RETRSYMLINKS,
  43.    ROBOTS, SAVEHEADERS, SERVERRESPONSE, SIMPLEHOSTCHECK,
  44.    SPANHOSTS, SPIDER, TIMEOUT, TIMESTAMPING, USEPROXY,
  45.    USERAGENT, VERBOSE, WAIT,
  46.    LAST
  47. } cmdid;
  48.  
  49. /* Valid command types: */
  50. enum cmdtype {
  51.    CONOFF,                      /* ONOFF (toggle). */
  52.    CNUM,                        /* Number. */
  53.    CNUMINF,                     /* Number/infinity. */
  54.    CSTR,                        /* String. */
  55.    CVEC,                        /* Vector. */
  56.    CVECDIR,                     /* Vector of directories. */
  57.    CBYT,                        /* Bytes. */
  58.    CSPEC                        /* Special. */
  59. };
  60.  
  61. /* Command struct */
  62. struct cmd {
  63.    char *name;
  64.    cmdid id;
  65.    void *varp;
  66.    enum cmdtype what_to_do;
  67. };
  68.  
  69. enum { SINF = 1 };
  70.  
  71. int comind PARAMS((const struct cmd *, const char *));
  72. char *home_dir PARAMS((void));
  73. char *init_path PARAMS((void));
  74. void run_wgetrc PARAMS((const char *));
  75. void initialize PARAMS((void));
  76. int parse_line PARAMS((const unsigned char *, unsigned char **, unsigned char **));
  77. int setval PARAMS((const char *, const char *));
  78. int onoff PARAMS((const char *));
  79. int setonoff PARAMS((int *, const char *, const char *));
  80. int setnum PARAMS((int *, const char *, const char *, int));
  81. int setbytes PARAMS((long *, const char *, const char *));
  82. void defaults PARAMS((void));
  83. char *home_dir PARAMS((void));
  84. int myatoi PARAMS((const char *));
  85. int getperms PARAMS((const char *));
  86. void cleanup PARAMS((void));
  87.  
  88. #endif /* INIT_H */
  89.